#include <iostream>
#include <sstream>
#include <algorithm>
using namespace std;

#ifndef TEST
#define IN(iss) {                       \
        std::string str;                \
        std::getline(std::cin, str);    \
        iss.str(str);                   \
    }
#define OUT(s) std::cout << s
#endif

int main() {
    istringstream iss;
    IN(iss);

    string tmp = iss.str();
    std::reverse(tmp.begin(), tmp.end());
    ostringstream oss;
    oss << tmp;
    OUT(oss.str());
    return 0;
}

#ifdef TEST
struct TestCase CASES[] = {
    /*0*/{"123", "321"},
    /*1*/{"ab", "ba"},
    /*2*/{"a", "a"},
    /*3*/{"", ""},
};
#endif